#include "resource.h"

Resource::Resource(const char *name) {

	this->name = new char[strlen(name)+1];
	this->name = strcpy((char *)this->name, name);

}

Resource::~Resource() {

	if (this->name) delete this->name;
	
	
}

const char *Resource::getName() {
	return this->name;
//	return SG_getResourceName(this->resource);	This sentence is also correct
}

SG_Resource Resource::getSGResource() {
	return this->resource;
}

SG_resource_t Resource::getType() {
	return SG_getResourceType(this->resource);
}

bool Resource::isPerformanceConstant() {
	return (SG_resourcePerformanceIsConstant(this->resource)==1);
}
